package cn.ithers.blog.service.impl;

import cn.ithers.blog.utils.EmailSender;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.mail.MessagingException;

/**
 * @Author: zhanghuan
 * @date: 2020/8/30 16:20
 * @description: 异步发送邮箱
 */
@Service
public class TaskService {
    @Async
    public void sendEmailVarifyCode(String verifyCode, String emailAddress) throws MessagingException {
        EmailSender.sendRegisterVerifyCode(verifyCode, emailAddress);
    }
}
